package org.app.data;

import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.app.entities.Info;
import org.app.entities.Users;
import org.app.format.EnumJSON;
import org.app.format.EnumXML;
import org.app.format.WeSerialized;
import org.app.format.WeJSONSerialized;
import org.app.format.WeXMLSerialized;
import org.app.jax.MyJAXB;
import org.app.original.MyJSONEnum;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

/**
 * Unit test for simple App.
 */
public class AppTestEnum 
    extends TestCase
{
    /**
     * Create the test case
     *
     * @param testName name of the test case
     */
    public AppTestEnum( String testName )
    {
        super( testName );
    }

    /**
     * @return the suite of tests being tested
     */
    public static Test suite()
    {
        return new TestSuite( AppTestEnum.class );
    }

    /**
     * Rigourous Test :-)
     */
    public void testApp()
    {
        assertTrue( true );
    }
    
    public void testJSON(){
    	EnumJSON enums=EnumJSON.STRING;
    	System.out.println(enums.execute("user"));
    	System.out.println(EnumJSON.NUMBER.execute("user"));
    	System.out.println(((EnumJSON)enums.changeTo("MAP")).getValue());
    	System.out.println(enums.changeTo("NUMBER").execute(11));
    	System.out.println(enums.changeTo("MAP").execute(new Object[]{"map","list"}));
    	System.out.println(enums);
    }
    
    public void testing(){
    	System.out.println(format(new Object[]{"name","zheng","jing"}));
    }
    
    public String format (Object... obj){
    	String rt="";
    	rt=String.format("%s:%s", obj);
    	
    	return rt;
    }
}
